import { createRouter, createWebHashHistory } from "vue-router"

import LayOutMain from '../components/LayOutMain.vue'

const routes = [{
        path: '/',
        redirect: '/home'
    },
    {
        path: '/',
        name: 'LayOutMain',
        component: LayOutMain,
        children: [
            { path: '/home', name: 'HomeLay', component: () =>
                    import ('../views/HomeLay.vue') },
            { path: '/getTable', name: 'bk_table', component: () => import('../views/GetTable.vue') },
            { path: '/qrdecoder', name: 'qrdecoder', component: () => import('../views/QrCode') },
            { path: '/newinterface', name: 'newinterface', component: () => import('../views/InterFace/NewInterFace') },
            { path: '/modifyinterface', name: 'modifyinterface', component: () => import('../views/InterFace/ModifyInterFace') }
        ]
    }
]

const router = createRouter({
    history: createWebHashHistory(),
    routes
})

export default router